package com.hina.rec.application.convert;

import com.hina.rec.domain.model.SettlePaymentDO;
import com.hina.rec.endpoint.req.SettlePaymentSaveReq;
import com.hina.rec.endpoint.req.SettlePaymentUpdateReq;
import com.hina.rec.endpoint.res.SettlePaymentRes;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 结算单回款对象转换器
 *
 * @author dequal
 * @since 2025-05-23
 */
@Mapper
public interface SettlePaymentConvert {
    
    SettlePaymentConvert INSTANCE = Mappers.getMapper(SettlePaymentConvert.class);
    
    /**
     * DO转Res
     *
     * @param settlePaymentDO DO对象
     * @return Res对象
     */
    SettlePaymentRes toRes(SettlePaymentDO settlePaymentDO);
    
    /**
     * SaveReq转DO
     *
     * @param req 保存请求对象
     * @return DO对象
     */
    SettlePaymentDO toDO(SettlePaymentSaveReq req);
    
    /**
     * UpdateReq转DO
     *
     * @param req 更新请求对象
     * @return DO对象
     */
    SettlePaymentDO toDO(SettlePaymentUpdateReq req);
} 